<?php
namespace app\admin\controller;

use app\admin\model\Member as User;

class Member extends Base
{
    public function member_list()
    {
        $users = User::paginate(2);

        return view('member/member-list',[
            'users'=>$users
        ]);
    }
    public function member_add()
    {
        return view('member/member-add');
    }
    public function member_del()
    {
        return view('member/member-del');
    }
    public function member_edit()
    {
        return view('member/member-edit');
    }
    public function member_password()
    {
        return view('member/member-password');
    }

    public function member_detail($id)
    {

        $user = User::with(['memberAddress'])->where('id',$id)->find();


        return view('member/member-view',[
            'user'=>$user
        ]);

    }
}
